<% layout('/layout/default.html', {title: '流程文件部署', libs: ['validate','icheck']}){ %>
<div class="main-content">
  <div class="box box-main">
    <div class="box-header with-border">
      <div class="box-title">
        <i class="fa fa-pencil-square-o"></i> 流程文件部署
      </div>
      <div class="box-tools pull-right">
        <button class="btn btn-box-tool" data-widget="collapse" type="button"><i class="fa fa-minus"></i></button>
      </div>
    </div>
    <form action="/act/process/deploy" class="form-horizontal" enctype="multipart/form-data" id="inputForm"
          method="post">
      <div class="box-body">

        <div class="row">
          <div class="col-xs-12">
            <div class="form-group">
              <label class="control-label col-sm-2" title="">流程分类：</i>
              </label>
              <div class="col-sm-8">
                <#form:select path="category" name="label" data="getDictList:act_category" class="form-control required"
                />
              </div>
            </div>
          </div>

        </div>

        <div class="row">
          <div class="col-xs-12">
            <div class="form-group">
              <label class="control-label col-sm-2" title="">
                <span class="required hide">*</span> 流程文件：<i class="fa icon-question hide"></i></label>
              <div class="col-sm-8">
                <input class=" required" id="file" name="file" type="file"/>
                <span class="help-inline">支持文件格式：zip、bar、bpmn、bpmn20.xml</span>
              </div>
            </div>
          </div>
        </div>

      </div>

      <div class="box-footer">
        <div class="row">
          <div class="col-sm-offset-2 col-sm-10">
            <% if (hasPermi('act:process:edit')){ %>
            <button class="btn btn-sm btn-primary" id="btnSubmit" type="submit"><i class="fa fa-check"></i> 执行部署
            </button>
            <% } %>
            <button class="btn btn-sm btn-default" id="btnCancel" onclick="window.parent.closeCurrentTabPage()"
                    type="button"><i class="fa fa-reply-all"></i> 关 闭
            </button>
          </div>
        </div>
      </div>
    </form>
  </div>
</div>
<% } %>

<script type="text/javascript">
    $("#inputForm").validate({
        submitHandler: function (form) {
            js.ajaxSubmitForm($(form), function (data) {
                js.showMessage(data.message);
            });
        }
    });
</script>


